package com.qfjy.homework.liunian;

/**
 * @author : liunian
 * @date :2022/11/10 19:01
 * @VERSION : 1.0
 */
public class RealImage implements Image {
    private String fileName;

    public RealImage(String fileName){
        this.fileName = fileName;
        System.out.println("真类构造方法");
        loadFromDisk(fileName);
    }
    @Override
    public void display() {

        System.out.println("执行真类");
        System.out.println("Displaying " + fileName);
        System.out.println("真类已执行");

    }
    private void loadFromDisk(String fileName){
        System.out.println("Loading " + fileName);
    }
}
